package com.example.easyexcel;

import com.alibaba.excel.EasyExcel;

import java.util.ArrayList;

/**
 * @author hx
 * @create 2022/5/10 13:58
 * description:
 */

public class testwrite {
    public static void main(String[] args) {
        ArrayList<UserData> list = new ArrayList<>();
        for (int i = 0; i < 10; i++) {
            UserData userData = new UserData();
            userData.setUid(i);
            userData.setUsername("张三"+i);
            list.add(userData);
        }

        String filename="D:\\BaiduNetdiskDownload\\医疗项目--尚医通\\excel\\01.xlsx";
        EasyExcel.write(filename,UserData.class).sheet("用户信息").doWrite(list);
    }
}
